<?php

namespace App\Http\Requests\Images;

use App\Http\Requests\BaseRequests;

class ImagesRequests extends BaseRequests
{
    public function rules()
    {
        $rules = [
            'title'         => 'required|max:100',
            'description'   => 'required|max:255',
            'cover'         => 'required|max:255',
            'imgs'          => 'required',
            'tabs'          => 'required',
        ];
        return $rules;
    }

    public function attributes()
    {
        $attributes = [
            'title'         => '标题',
            'description'   => '介绍',
            'cover'         => '封面',
            'imgs'          => '图集',
            'tabs'          => '标签',
        ];
        return $attributes;
    }

    public function messages()
    {
        $message = [
            'required'      => ':attribute不得为空',
            'max'           => ':attribute长度必须小于:max位',
            'min'           => ':attribute长度必须大于:min位',
        ];
        return $message;
    }
}